In performing a machining operation such as sealing, welding and coating using an industrial robot, there is known a stitch machining in which a robot controller intermittently issues machining start and stop commands at regular intervals to a peripheral device for performing such machining to thereby intermittently perform the machining operation such as sealing, welding and coating. In the case of sealing, a sealing gun is attached to a wrist at a distal end of a robot arm, and the stitch machining is performed in such manner that on/off commands for applying sealant are issued to a sealing gun controller intermittently while a robot is operating, to thereby apply sealant to a workpiece along a robot traveling path (sealing gun traveling path) intermittently. Also, in the case of arc welding, there is known stitch machining in which welding is performed intermittently by a welding torch attached to a wrist at a distal end of a robot arm. Further, in the case of coating by a robot, there is known stitch machining in which coating is performed intermittently by intermittently projecting coating material from a coating gun.
Conventionally, in such stitch machining, for example, in sealing, commands designating a start position of an application of sealant and a stop position of the application of sealant are taught by turns, and also commands designating a start of application of sealant and a stop of the application of sealant by turns. For example, as shown in FIG. 5a, a taught program for the stitch machining is prepared to contain a motion command to a sealing start position Ps, an application of sealant start command, a motion command to an application of sealant stop position P1, an application of sealant stop command, a motion command to an application of sealant start position P2, an application of sealant start command, a motion command to an application of sealant stop position P3, . . . in this order.
As is understood from the above, in order to perform the stitch machining, a large number of points (on/off switching positions of application of sealant, on/off switching positions of welding, on/off switching positions of application of coating material) need to be taught. Further, in order to maintain regular on/off intervals, on/off switching positions have to be taught accurately. Furthermore, there is a problem that when an on-section (a section where sealant is to be applied, a section where welding is to be performed, a section where coating material is to be applied) or an off-section (a section where sealant is not to be applied, a section where welding is not to be performed, a section where coating material is not to be applied) which have been taught are to be changed, the on/off switching points need to be taught again. There is another problem that a large memory is necessary for storing the taught program since a large number of points are taught.
Further, since a short action of the on-section and a short action of the off-section are repeatedly executed, there may happen cases where processing for planning a following path can not be performed in time, so that the traveling speed of the end effector attached to the wrist of the robot decreases. Thus, this causes a problem that a distance (of the on-section or the off-section) larger than a certain value can not be taught in dependence on a throughput of a robot controller.